<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include  file="/common/mytags.jsp"%>
<!DOCTYPE html>
<html>
	<head>
	    <title>系统用户修改密码</title>
	    <%@ include file="/common/common_h.jsp" %>
	    <script type="text/javascript">
	    $(function(){
	    	$("#myForm").validate();
	    });
	    function submitFn(){
	    	if($("#myForm").valid()){
	    		$.ajax({
	    		    type: "post",
	    		    url: "${basePath}supplier/updatePsw.shtml",
	    		    data: "password="+$("#password").val(),
	    		    dataType: "json",
	    		    success: function(res){
	    		    	if(res.success){
	    		    		successAlert(res.msg,function(){parent.location.reload();});
	    		    	}else{
	    		    		errorAlert(res.msg);
	    		    	}
	    		    }
	    	    });
	    	}
	    }
	    </script>
	</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeIn">
        <div class="row">
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>供应商修改密码</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="myForm" method="post" action="${basePath }supplier/updatePsw.shtml">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户名：</label>
                                <div class="col-sm-8">
                                    <input id="userName" name="userName" value="${sessionScope.CURR_USERINFO_M.userName}" readonly type="text" maxlength="20" required class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">登录密码：</label>
                                <div class="col-sm-8">
                                    <input id="password" name="password" type="password" maxlength="20" required class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">确认密码：</label>
                                <div class="col-sm-8">
                                    <input id="confirm_password" name="confirm_password" type="password" equalTo="#password" maxlength="20" required class="form-control">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>  请再次输入的密码</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-3">
                                    <button class="btn btn-primary" type="button" onclick="submitFn()">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="${basePath }common/hplus/js/content.min.js?v=1.0.0"></script>
    <script src="${basePath }common/hplus/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="${basePath }common/hplus/js/plugins/validate/messages_zh.min.js"></script>
</body>

</html>
